<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="OpenLS.UI.SliderResources"
    >

  <!-- Brushes-->

  <LinearGradientBrush x:Key="LightBrush" EndPoint="0,1" StartPoint="0,0" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
      <GradientStop Offset="0" Color="#FF7496C2" />
      <GradientStop Offset="1" Color="#FFDEE2EC" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="NormalBorderBrush" StartPoint="0,0" EndPoint="0,1"> <!-- obsolete?-->
        <GradientStop Color="#FF2F578D" Offset ="0"/>
        <GradientStop Color="#FF2F578D" Offset ="1"/>
  </LinearGradientBrush>

  
  <LinearGradientBrush x:Key="DarkBrush"  EndPoint="0,1" StartPoint="0,0" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
    <GradientStop Offset="0" Color="#FFF3F5F7" />
    <GradientStop Offset="0.20779220779220775" Color="#FFFFFEFC" />
    <GradientStop Offset="0.28571428571428581" Color="#FFFFFDF5" />
    <GradientStop Offset="0.45454545454545425" Color="#FFF2D990" />
    <GradientStop Offset="0.51948051948051932" Color="#FFF2D990" />
    <GradientStop Offset="0.72727272727272707" Color="#FFFEDF83" />
    <GradientStop Offset="0.90909090909090906" Color="#FFFFE59B" />
    <GradientStop Offset="1" Color="#FFF2E9CB" />
  </LinearGradientBrush>

  <LinearGradientBrush x:Key="NormalBrush" EndPoint="0,1" StartPoint="0,0" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
    <GradientStop Offset="0" Color="#FFECF0F6" />
    <GradientStop Offset="0.10389610389610388" Color="#FFF2F6FC" />
    <GradientStop Offset="0.25974025974025994" Color="#FFC7DBF3" />
    <GradientStop Offset="0.44155844155844132" Color="#FFBCCDE2" />
    <GradientStop Offset="0.55844155844155863" Color="#FF84A2C6" />
    <GradientStop Offset="0.7532467532467535" Color="#FFCCDFF2" />
    <GradientStop Offset="0.92207792207792194" Color="#FFF4F8FC" />
    <GradientStop Offset="1" Color="#FFF1F5F8" />
  </LinearGradientBrush>


  <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />

  <SolidColorBrush x:Key="DisabledBackground" Color="#EEE" />

  <SolidColorBrush x:Key="WindowBackground" Color="#FFF" />

  <SolidColorBrush x:Key="SelectedBackground" Color="#DDD" />
  
  <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />

  <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />

  <SolidColorBrush x:Key="LightBorderBrush" Color="#AAA" />

  <!-- Miscellaneous Brushes -->
  <SolidColorBrush x:Key="GlyphBrush" Color="#444" />

  <SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />


  <!-- SimpleStyles: Slider -->
    <Style x:Key="SliderButtonStyle" TargetType="{x:Type RepeatButton}">
      <Setter Property="SnapsToDevicePixels" Value="true"/>
      <Setter Property="OverridesDefaultStyle" Value="true"/>
      <Setter Property="IsTabStop" Value="false"/>
      <Setter Property="Focusable" Value="false"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="{x:Type RepeatButton}">
            <Border Background="Transparent" />
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>

    <Style x:Key="SliderThumbStyle" TargetType="{x:Type Thumb}">
      <Setter Property="SnapsToDevicePixels" Value="true"/>
      <Setter Property="OverridesDefaultStyle" Value="true"/>
      <Setter Property="Height" Value="14"/>
      <Setter Property="Width" Value="14"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="{x:Type Thumb}">
            <Path 
              Name="Ellipse" 
              Fill="{StaticResource NormalBrush}"
              Stroke="{StaticResource NormalBorderBrush}"
              StrokeThickness="1" 
              Data="M0 0 L8 0 L 8 8 L 4 12 L 0 8 L 0 0 M 4 4 L 4 8"/>
            <ControlTemplate.Triggers>
              <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="Ellipse" Property="Fill" Value="{StaticResource DarkBrush}"/>
              </Trigger>
              <Trigger Property="IsEnabled" Value="false">
                <Setter TargetName="Ellipse" Property="Fill" Value="{StaticResource DisabledBackground}"/>
              </Trigger>
            </ControlTemplate.Triggers>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>

    <ControlTemplate x:Key="HorizontalSlider" TargetType="{x:Type Slider}">
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto" MinHeight="{TemplateBinding Slider.MinHeight}"/>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TickBar 
          Name="TopTick"
          SnapsToDevicePixels="True" 
          Placement="Top"
          Fill="{StaticResource GlyphBrush}"
          Height="4"
          Visibility="Collapsed" />
        <Border 
          Name="TrackBackground"
          Margin="0"
          CornerRadius="2" 
          Height="2"
          Grid.Row="1"
          Background="{StaticResource LightBrush}" 
          BorderBrush="{StaticResource NormalBorderBrush}"
          BorderThickness="0" />
        <Track Grid.Row="1" Name="PART_Track">
          <Track.DecreaseRepeatButton>
            <RepeatButton 
              Style="{StaticResource SliderButtonStyle}"
              Command="Slider.DecreaseLarge" />
          </Track.DecreaseRepeatButton>
          <Track.Thumb>
            <Thumb Style="{StaticResource SliderThumbStyle}" />
          </Track.Thumb>
          <Track.IncreaseRepeatButton>
            <RepeatButton 
              Style="{StaticResource SliderButtonStyle}"
              Command="Slider.IncreaseLarge" />
          </Track.IncreaseRepeatButton>
        </Track>
        <TickBar 
          Name="BottomTick"
          SnapsToDevicePixels="True" 
          Grid.Row="2"
          Fill="{TemplateBinding Foreground}"
          Placement="Bottom"
          Height="4"
          Visibility="Collapsed" />
      </Grid>
      <ControlTemplate.Triggers>
        <Trigger Property="TickPlacement" Value="TopLeft">
          <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
        </Trigger>
        <Trigger Property="TickPlacement" Value="BottomRight">
          <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
        </Trigger>
        <Trigger Property="TickPlacement" Value="Both">
          <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
          <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
        </Trigger>
      </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="VerticalSlider" TargetType="{x:Type Slider}">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto" MinWidth="{TemplateBinding Slider.MinWidth}"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TickBar 
          Name="TopTick"
          SnapsToDevicePixels="True" 
          Placement="Left"
          Fill="{StaticResource GlyphBrush}"
          Width="4"
          Visibility="Collapsed" />
        <Border 
          Name="TrackBackground"
          Margin="0"
          CornerRadius="2" 
          Width="4"
          Grid.Column="1"
          Background="{StaticResource HorizontalLightBrush}" 
          BorderBrush="{StaticResource HorizontalNormalBorderBrush}"
          BorderThickness="1" />
        <Track Grid.Column="1" Name="PART_Track">
          <Track.DecreaseRepeatButton>
            <RepeatButton 
              Style="{StaticResource SliderButtonStyle}"
              Command="Slider.DecreaseLarge" />
          </Track.DecreaseRepeatButton>
          <Track.Thumb>
            <Thumb Style="{StaticResource SliderThumbStyle}" />
          </Track.Thumb>
          <Track.IncreaseRepeatButton>
            <RepeatButton 
              Style="{StaticResource SliderButtonStyle}"
              Command="Slider.IncreaseLarge" />
          </Track.IncreaseRepeatButton>
        </Track>
        <TickBar 
          Name="BottomTick"
          SnapsToDevicePixels="True" 
          Grid.Column="2"
          Fill="{TemplateBinding Foreground}"
          Placement="Right"
          Width="4"
          Visibility="Collapsed" />
      </Grid>
      <ControlTemplate.Triggers>
        <Trigger Property="TickPlacement" Value="TopLeft">
          <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
        </Trigger>
        <Trigger Property="TickPlacement" Value="BottomRight">
          <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
        </Trigger>
        <Trigger Property="TickPlacement" Value="Both">
          <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
          <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
        </Trigger>
      </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style TargetType="{x:Type Slider}" x:Key="zoomSlider">
      <Setter Property="SnapsToDevicePixels" Value="true"/>
      <Setter Property="OverridesDefaultStyle" Value="true"/>
      <Style.Triggers>
        <Trigger Property="Orientation" Value="Horizontal">
          <Setter Property="MinWidth" Value="104" />
          <Setter Property="MinHeight" Value="21" />
          <Setter Property="Template" Value="{StaticResource HorizontalSlider}" />
        </Trigger>
        <Trigger Property="Orientation" Value="Vertical">
          <Setter Property="MinWidth" Value="21" />
          <Setter Property="MinHeight" Value="104" />
          <Setter Property="Template" Value="{StaticResource VerticalSlider}" />
        </Trigger>
      </Style.Triggers>
    </Style>
</ResourceDictionary>